package com.coffee.sku.service.sku.dao;

import com.coffee.sku.api.sku.query.SkuContentQuery;
import com.coffee.sku.api.sku.req.MerchantSkuListReq;
import com.coffee.sku.api.sku.req.SkuListReq;
import com.coffee.sku.api.sku.result.MerchantSkuListResult;
import com.coffee.sku.api.sku.result.SkuContentResult;
import com.coffee.sku.api.sku.result.SkuListResult;
import com.coffee.sku.service.sku.bean.SkuContent;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SkuContentDao {
    public SkuContent findById(Integer id);

    public SkuContent findBySkuId(Integer skuId);

    public SkuContent findByIdForUpdate(Integer id);

    public List<SkuContent> findByIds(@Param("idList") List<Integer> idList);

    public Integer count(@Param("param") SkuContentQuery param);

    public List<SkuContent> page(@Param("param") SkuContentQuery param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public SkuContent findFirst(@Param("param") SkuContentQuery param);

    public Integer insert(SkuContent param);

    Integer insertBatch(List<SkuContent> list);

    public void updateById(@Param("param") SkuContent param);

    public Integer deleteById(Integer id);

    public Integer deleteByIds(List<Integer> idList);


    public Integer skuCount(@Param("param") SkuListReq param);

    public Integer merchantSkuCount(@Param("param") MerchantSkuListReq param);

    public List<SkuListResult> skuPage(@Param("param") SkuListReq param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public List<SkuListResult> skuPageById(@Param("idList") List<Integer> idList);

    public List<MerchantSkuListResult> merchantSkuPage(@Param("param") MerchantSkuListReq param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public List<MerchantSkuListResult> merchantSkuPageBySkuIds(@Param("idList") List<Integer> idList);

    public List<MerchantSkuListResult> merchantSkuPageBySkuIdsAndPeriodization(@Param("idList") List<Integer> idList,@Param("hostSkuId") Integer hostSkuId);

    public SkuContentResult findSkuContentResultBySkuId(Integer skuId);

}